package com.foreveross.mofang.datapersistence.web.controller.core;

import java.util.HashMap;
import java.util.Map;

import javax.inject.Inject;
import javax.validation.Valid;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.foreveross.mofang.datapersistence.application.FileDataManageApplication;
import com.foreveross.mofang.datapersistence.application.vo.FileInfo;

/**
 * 一句话描述
 * 
 * @author fb
 */
@Controller
@RequestMapping("/core/File")
public class FileDataController extends BaseController{
	
	@Inject
	private FileDataManageApplication fileDataManageApplication;
	
    @ResponseBody
    @RequestMapping("/download")
    public Map<String, Object> download(@Valid FileInfo file) {
    	Map<String, Object> result = new HashMap<String, Object>();
    	
    	result.put("result", fileDataManageApplication.fstDFSFileDown(file));
    	
        return result;
    }
}
